package com.gaoboy.springbootgoods.schedule;

import com.gaoboy.springbootgoods.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class OrderScheduler {

    @Autowired
    private OrderMapper orderMapper;

    //运行定时任务
    @Scheduled(fixedRate = 10000)
    public void invalidOrder(){
        orderMapper.invalidOrder();
    }
}
